//
//  BottomTitleButton.swift
//  NetMusic
//
//  Created by PushMeBaby on 16/2/19.
//  Copyright © 2016年 CoderC. All rights reserved.
//

import UIKit

class BottomTitleButton: UIButton {

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code
    }
    */
    
    
//    override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool {
//        
//    }
    
    
    override func imageRectForContentRect(contentRect: CGRect) -> CGRect {
//        super.imageRectForContentRect(contentRect)
        
        let imageRect = CGRectMake(0, 0, self.bounds.width, self.bounds.height - 20)
        
        
        return imageRect
    }
    
    
    
    override func titleRectForContentRect(contentRect: CGRect) -> CGRect {
        super.titleRectForContentRect(contentRect)
        
        let titleLabelH: CGFloat = 10.0
        
        let titleLabelRect = CGRectMake(0, self.bounds.height - titleLabelH , self.bounds.width, titleLabelH)
        return titleLabelRect
    }
    
    

}
